package com.macrog.controller;

import com.macrog.webservice.client.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by guohong on 2018/4/26.
 */
@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @RequestMapping(value = "/hello/{id}")
    @ResponseBody
    public String hello(@PathVariable("id") String id) {
        String macrog = helloService.say("macrog");
        return macrog + id;
    }

}
